package org.cs.publics.model;
// Generated 2018-12-28 17:39:08 by Hibernate Tools 5.2.3.Final

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 收益表
 */

/**
 * Earnings generated by hbm2java
 */
@Entity
@Table(name = "earnings", catalog = "good_fresh")
public class Earnings implements java.io.Serializable {

	private Integer earningsId;
	private OrderInfo orderInfo;
	private PickGoods pickGoods;
	private String earningsRule;
	private Long earningsOrder;
	private Date earningsTime;
	private Date createTime;
	private Date updateTime;
	private String goodsHoldOne;
	private String goodsHoldTwo;

	public Earnings() {
	}

	public Earnings(OrderInfo orderInfo, PickGoods pickGoods, String earningsRule, Long earningsOrder,
			Date earningsTime, Date createTime, Date updateTime, String goodsHoldOne, String goodsHoldTwo) {
		this.orderInfo = orderInfo;
		this.pickGoods = pickGoods;
		this.earningsRule = earningsRule;
		this.earningsOrder = earningsOrder;
		this.earningsTime = earningsTime;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.goodsHoldOne = goodsHoldOne;
		this.goodsHoldTwo = goodsHoldTwo;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "EARNINGS_ID", unique = true, nullable = false)
	public Integer getEarningsId() {
		return this.earningsId;
	}

	public void setEarningsId(Integer earningsId) {
		this.earningsId = earningsId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ORDER_INFO_ID")
	public OrderInfo getOrderInfo() {
		return this.orderInfo;
	}

	public void setOrderInfo(OrderInfo orderInfo) {
		this.orderInfo = orderInfo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PICK_GOODS_ID")
	public PickGoods getPickGoods() {
		return this.pickGoods;
	}

	public void setPickGoods(PickGoods pickGoods) {
		this.pickGoods = pickGoods;
	}

	@Column(name = "EARNINGS_RULE", length = 100)
	public String getEarningsRule() {
		return this.earningsRule;
	}

	public void setEarningsRule(String earningsRule) {
		this.earningsRule = earningsRule;
	}

	@Column(name = "EARNINGS_ORDER", precision = 10, scale = 0)
	public Long getEarningsOrder() {
		return this.earningsOrder;
	}

	public void setEarningsOrder(Long earningsOrder) {
		this.earningsOrder = earningsOrder;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "EARNINGS_TIME", length = 19)
	public Date getEarningsTime() {
		return this.earningsTime;
	}

	public void setEarningsTime(Date earningsTime) {
		this.earningsTime = earningsTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "UPDATE_TIME", length = 19)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "GOODS_HOLD_ONE")
	public String getGoodsHoldOne() {
		return this.goodsHoldOne;
	}

	public void setGoodsHoldOne(String goodsHoldOne) {
		this.goodsHoldOne = goodsHoldOne;
	}

	@Column(name = "GOODS_HOLD_TWO")
	public String getGoodsHoldTwo() {
		return this.goodsHoldTwo;
	}

	public void setGoodsHoldTwo(String goodsHoldTwo) {
		this.goodsHoldTwo = goodsHoldTwo;
	}

}
